<?php

namespace App\Adapter;



class Phone
{
    //充电
    public function charging(IVoltage5V $IVoltage5V){
        if ($IVoltage5V->output5V() == 5){
            echo "电压为5V, 可以充电~~";
        }elseif ($IVoltage5V->output5V() > 5){
            echo "电压大于5V, 不能充电~~";
        }
    }
}
